import { createApp, toRaw } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from '@/App'
import store from './store';
import router from './router/index'
// 公共样式
// global css
import '@/assets/styles/index.scss';
import 'element-plus/theme-chalk/dark/css-vars.css';

// import { createPinia } from 'pinia'
import api from "@/api/index"
// 固化插件
// import piniaPersist from 'pinia-plugin-persist'


// 预设动画
import animate from './animate';

import './permission';

//导入Svg图片插件，可以在页面上显示Svg图片
import 'virtual:svg-icons-register';
import ElementIcons from '@/plugins/svgicon';

// 国际化
import i18n from '@/lang/index';




// 注册插件
import plugins from './plugins/index'; // plugins

// const pinia = createPinia()
// pinia.use(piniaPersist);


const app = createApp(App)


app.config.globalProperties.animate = animate;


app.use(ElementIcons);
app.use(api)
app.use(router)
app.use(ElementPlus)
app.use(store);
app.use(i18n);
app.use(plugins);
// app.use(pinia)
app.mount('#app')
